package com.ftg.learn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 库存流水表
 * </p>
 *
 * @author 布衣
 * @since 2025-07-22
 */
@Getter
@Setter
@ToString
@TableName("stock_log")
public class StockLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long skuId;

    /**
     * 正数加库存，负数减库存
     */
    private Integer deltaQty;

    private Integer newStock;

    private Long adminId;

    private String note;

    private LocalDateTime createdAt;
}
